-- GENERATED SPELL FOR [Hatecryer] --


function spell0_20930(pUnit, Event) --@Curse of Burning Shadows,n/a--
pUnit:FullCastSpellOnTarget(36541,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20930', 641, 1)
end

function spell1_20930(pUnit, Event) --@Rain of Chaos,n/a--
pUnit:FullCastSpellOnTarget(34017,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20930', 9000, 1)
end

function Sorts_20930(pUnit, Event)
local choix_sorts_20930 = math.random(0, 1)
if choix_sorts_20930 == 0 then
pUnit:RegisterEvent('spell0_20930', 1, 1)
end
if choix_sorts_20930 == 1 then
pUnit:RegisterEvent('spell1_20930', 1, 1)
end
end

function mob20930_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20930', math.random(1500, 3000), 1)
end

function mob20930_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20930_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20930_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20930, 1, 'mob20930_Action')
RegisterUnitEvent(20930, 2, 'mob20930_Leave')
RegisterUnitEvent(20930, 3, 'mob20930_Kill')
RegisterUnitEvent(20930, 4, 'mob20930_Die')
